Optimal. Leaf size=221 \[ -\frac {a \left (4 a^2 B+15 a b C+12 b^2 B\right ) \sin ^3(c+d x)}{15 d}+\frac {a^2 (5 a C+7 b B) \sin (c+d x) \cos ^3(c+d x)}{20 d}+\frac {\left (4 a^3 B+15 a^2 b C+14 a b^2 B+5 b^3 C\right ) \sin (c+d x)}{5 d}+\frac {\left (3 a^3 C+9 a^2 b B+12 a b^2 C+4 b^3 B\right ) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {1}{8} x \left (3 a^3 C+9 a^2 b B+12 a b^2 C+4 b^3 B\right )+\frac {a B \sin (c+d x) \cos ^4(c+d x) (a+b \sec (c+d x))^2}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.55, antiderivative size = 221, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4072, 4025, 4074, 4047, 2635, 8, 4044, 3013} \[ -\frac {a \left (4 a^2 B+15 a b C+12 b^2 B\right ) \sin ^3(c+d x)}{15 d}+\frac {\left (15 a^2 b C+4 a^3 B+14 a b^2 B+5 b^3 C\right ) \sin (c+d x)}{5 d}+\frac {\left (9 a^2 b B+3 a^3 C+12 a b^2 C+4 b^3 B\right ) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {1}{8} x \left (9 a^2 b B+3 a^3 C+12 a b^2 C+4 b^3 B\right )+\frac {a^2 (5 a C+7 b B) \sin (c+d x) \cos ^3(c+d x)}{20 d}+\frac {a B \sin (c+d x) \cos ^4(c+d x) (a+b \sec (c+d x))^2}{5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 3013
Rule 4025
Rule 4044
Rule 4047
Rule 4072
Rule 4074
Rubi steps
\begin {align*} \int \cos ^6(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\int \cos ^5(c+d x) (a+b \sec (c+d x))^3 (B+C \sec (c+d x)) \, dx\\ &=\frac {a B \cos ^4(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}-\frac {1}{5} \int \cos ^4(c+d x) (a+b \sec (c+d x)) \left (-a (7 b B+5 a C)-\left (4 a^2 B+5 b^2 B+10 a b C\right ) \sec (c+d x)-b (2 a B+5 b C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {a^2 (7 b B+5 a C) \cos ^3(c+d x) \sin (c+d x)}{20 d}+\frac {a B \cos ^4(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {1}{20} \int \cos ^3(c+d x) \left (4 a \left (4 a^2 B+12 b^2 B+15 a b C\right )+5 \left (9 a^2 b B+4 b^3 B+3 a^3 C+12 a b^2 C\right ) \sec (c+d x)+4 b^2 (2 a B+5 b C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {a^2 (7 b B+5 a C) \cos ^3(c+d x) \sin (c+d x)}{20 d}+\frac {a B \cos ^4(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {1}{20} \int \cos ^3(c+d x) \left (4 a \left (4 a^2 B+12 b^2 B+15 a b C\right )+4 b^2 (2 a B+5 b C) \sec ^2(c+d x)\right ) \, dx+\frac {1}{4} \left (9 a^2 b B+4 b^3 B+3 a^3 C+12 a b^2 C\right ) \int \cos ^2(c+d x) \, dx\\ &=\frac {\left (9 a^2 b B+4 b^3 B+3 a^3 C+12 a b^2 C\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^2 (7 b B+5 a C) \cos ^3(c+d x) \sin (c+d x)}{20 d}+\frac {a B \cos ^4(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {1}{20} \int \cos (c+d x) \left (4 b^2 (2 a B+5 b C)+4 a \left (4 a^2 B+12 b^2 B+15 a b C\right ) \cos ^2(c+d x)\right ) \, dx+\frac {1}{8} \left (9 a^2 b B+4 b^3 B+3 a^3 C+12 a b^2 C\right ) \int 1 \, dx\\ &=\frac {1}{8} \left (9 a^2 b B+4 b^3 B+3 a^3 C+12 a b^2 C\right ) x+\frac {\left (9 a^2 b B+4 b^3 B+3 a^3 C+12 a b^2 C\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^2 (7 b B+5 a C) \cos ^3(c+d x) \sin (c+d x)}{20 d}+\frac {a B \cos ^4(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}-\frac {\operatorname {Subst}\left (\int \left (4 b^2 (2 a B+5 b C)+4 a \left (4 a^2 B+12 b^2 B+15 a b C\right )-4 a \left (4 a^2 B+12 b^2 B+15 a b C\right ) x^2\right ) \, dx,x,-\sin (c+d x)\right )}{20 d}\\ &=\frac {1}{8} \left (9 a^2 b B+4 b^3 B+3 a^3 C+12 a b^2 C\right ) x+\frac {\left (4 a^3 B+14 a b^2 B+15 a^2 b C+5 b^3 C\right ) \sin (c+d x)}{5 d}+\frac {\left (9 a^2 b B+4 b^3 B+3 a^3 C+12 a b^2 C\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^2 (7 b B+5 a C) \cos ^3(c+d x) \sin (c+d x)}{20 d}+\frac {a B \cos ^4(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}-\frac {a \left (4 a^2 B+12 b^2 B+15 a b C\right ) \sin ^3(c+d x)}{15 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.87, size = 176, normalized size = 0.80 \[ \frac {6 a^3 B \sin (5 (c+d x))+10 a \left (5 a^2 B+12 a b C+12 b^2 B\right ) \sin (3 (c+d x))+15 a^2 (a C+3 b B) \sin (4 (c+d x))+60 (c+d x) \left (3 a^3 C+9 a^2 b B+12 a b^2 C+4 b^3 B\right )+60 \left (5 a^3 B+18 a^2 b C+18 a b^2 B+8 b^3 C\right ) \sin (c+d x)+120 \left (a^3 C+3 a^2 b B+3 a b^2 C+b^3 B\right ) \sin (2 (c+d x))}{480 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 174, normalized size = 0.79 \[ \frac {15 \, {\left (3 \, C a^{3} + 9 \, B a^{2} b + 12 \, C a b^{2} + 4 \, B b^{3}\right )} d x + {\left (24 \, B a^{3} \cos \left (d x + c\right )^{4} + 64 \, B a^{3} + 240 \, C a^{2} b + 240 \, B a b^{2} + 120 \, C b^{3} + 30 \, {\left (C a^{3} + 3 \, B a^{2} b\right )} \cos \left (d x + c\right )^{3} + 8 \, {\left (4 \, B a^{3} + 15 \, C a^{2} b + 15 \, B a b^{2}\right )} \cos \left (d x + c\right )^{2} + 15 \, {\left (3 \, C a^{3} + 9 \, B a^{2} b + 12 \, C a b^{2} + 4 \, B b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{120 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.36, size = 672, normalized size = 3.04 \[ \frac {15 \, {\left (3 \, C a^{3} + 9 \, B a^{2} b + 12 \, C a b^{2} + 4 \, B b^{3}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (120 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 75 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 225 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 360 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 360 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 180 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 60 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 120 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 160 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 30 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 90 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 960 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 960 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 360 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 120 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 480 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 464 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 1200 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 1200 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 720 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 160 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 30 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 90 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 960 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 960 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 360 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 120 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 480 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 120 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 75 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 225 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 360 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 360 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 180 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 60 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 120 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{5}}}{120 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.84, size = 227, normalized size = 1.03 \[ \frac {\frac {a^{3} B \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+C \,a^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+3 a^{2} b B \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+C \,a^{2} b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+B a \,b^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+3 C a \,b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+b^{3} B \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+b^{3} C \sin \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 217, normalized size = 0.98 \[ \frac {32 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} B a^{3} + 15 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{3} + 45 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} b - 480 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a^{2} b - 480 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a b^{2} + 360 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a b^{2} + 120 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B b^{3} + 480 \, C b^{3} \sin \left (d x + c\right )}{480 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.12, size = 277, normalized size = 1.25 \[ \frac {B\,b^3\,x}{2}+\frac {3\,C\,a^3\,x}{8}+\frac {9\,B\,a^2\,b\,x}{8}+\frac {3\,C\,a\,b^2\,x}{2}+\frac {5\,B\,a^3\,\sin \left (c+d\,x\right )}{8\,d}+\frac {C\,b^3\,\sin \left (c+d\,x\right )}{d}+\frac {5\,B\,a^3\,\sin \left (3\,c+3\,d\,x\right )}{48\,d}+\frac {B\,a^3\,\sin \left (5\,c+5\,d\,x\right )}{80\,d}+\frac {B\,b^3\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {C\,a^3\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {C\,a^3\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {3\,B\,a^2\,b\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {B\,a\,b^2\,\sin \left (3\,c+3\,d\,x\right )}{4\,d}+\frac {3\,B\,a^2\,b\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {3\,C\,a\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {C\,a^2\,b\,\sin \left (3\,c+3\,d\,x\right )}{4\,d}+\frac {9\,B\,a\,b^2\,\sin \left (c+d\,x\right )}{4\,d}+\frac {9\,C\,a^2\,b\,\sin \left (c+d\,x\right )}{4\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________